<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

//注册
Route::post('/register', 'user\RegisterController@register');
//登录
Route::post('/login', 'user\LoginController@login');

//新增逻辑路由组
Route::group(['prefix' => 'create'], function () {
    //新增年级
    Route::post('grade', 'organization\GradeController@createGrade');
    //新增学院
    Route::post('college', 'admin\CollegeDefaultController@createCollege');
});

//获取年级列表
Route::get('/grade', 'organization\GradeController@getGradeList');
//获取学院列表
Route::get('/college', 'admin\CollegeDefaultController@getCollegeDefaultList');

//删除
Route::group(['prefix' => 'delete'], function () {
    //新增学院
    Route::delete('college/{college_default}', 'admin\CollegeDefaultController@deleteCollegeDefault');
});

//更新
Route::group(['prefix' => 'modify'], function () {
    //修改学院
    Route::post('college/{college_default}', 'admin\CollegeDefaultController@modifyCollegeDefault');
});




